var efl = Ext.create( 'WebMeV.view.FileLoader' );

Ext.define('WebMeV.view.ribbon.items.Home', {
    extend: 'WebMeV.view.ribbon.RibbonTab',
    alias: 'widget.home',  
    requires: [
        'WebMeV.view.FileLoader'
    ],
    title: 'Home',
    closable: false,    
    items: [{
        title: '&nbsp;Session&nbsp;',
        items: [{
            xtype: 'buttongroup',
            columns: 1,
            frame: false, 
            items: [{
                id: 'ns',
                text: 'New<br>Start',
                rowspan: 3,
                iconCls: 'icon-ribbon-ns',
                scale: 'large',
                iconAlign: 'top',
                disabled: true,
                listeners : {
                    click: function(btn, e, eOpts) {
                        btn.disable();
                    }
                }

            }]
        }]
    },{
        title: 'File',
        items: [{
            xtype: 'buttongroup',
            columns: 2,
            frame: false,
            items: [{
                text: '&nbsp;Load&nbsp;<br>&nbsp;Data&nbsp;',
                rowspan: 3,
                iconCls: 'icon-ribbon-ld',
                scale: 'large',
                iconAlign: 'top',
                listeners : {
                    click: function(btn, e, eOpts) {
                        efl.setVisible(true);
                    }
                }

            },{
                text: 'Analysis',         
                iconCls: 'icon-ribbon-an16',
                menu: {
                    xtype: 'menu',
                    items: [{
                        text: '&nbsp;Open',
                        iconCls: 'open16'
                    },{
                        text: '&nbsp;Save',
                        iconCls: 'save16'
                    },{
                        text: '&nbsp;Save as',
                        iconCls: 'saveas16'
                    }]
                }
            },{
                text: 'Script', 
                iconCls: 'icon-ribbon-scrpt16', 
                menu: [{
                    text: '&nbsp;New',
                    iconCls: 'nscript16'
                },{
                    text: '&nbsp;Load',
                    iconCls: 'open16'
                }]
            },{
                text: 'Image',
                iconCls: 'icon-ribbon-pic16', 
                menu: [{
                    text: '&nbsp;Save',
                    iconCls: 'save16'
                },{
                    text: '&nbsp;Print',
                    iconCls: 'prn16'
                }]
            }]
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Statistics',
        columns: 2,
        items:[{
            text: 'More',
            rowspan: 3,
            scale: 'large',
            iconCls: 'icon-ribbon-stat',
            arrowAlign:'bottom',
            iconAlign: 'top',
            menu: [{
                text: 'Pavlidis Template Matching'
            },{
                text: 'Significance Analysis for Microarrays'
            },{
                text: 'Two-factor ANOVA'
            },{
                text: 'Nonparametric Tests'
            },{
                text: 'Bayesian Estimation of Temporal Regulation'
            },{
                text: 'Survival Analysis'
            },{
                text: 'Global Ancova'
            },{
                text: 'Rank Products'
            },{
                text: 'Mutual Information Network'
            }]
        },{
            text: 't-Test'
        },{
            text: 'ANOVA'
        },{
            text: 'LIMMA'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Clustering',
        columns: 2,
        items:[{
            text: 'More',
            rowspan: 3,
            iconCls: 'icon-ribbon-clust',
            scale: 'large',
            iconAlign: 'top',
            arrowAlign:'bottom',
            menu: [{
                text: 'Tree EASE'
            },{
                text: 'HCL Support Trees'
            },{
                text: 'Self Organizing Tree Algorithm'
            },{
                text: 'KMC Support'
            },{
                text: 'Cluster Affinity Search Technique'
            },{
                text: 'Figure of Merit'
            },{
                text: 'QT Cluster'
            },{
                text: 'Non-Negative Matrix Factorization'
            }]
        },{
            text: 'Hierarchical Clusters',
            tooltip: 'Hierarchical Clustering'
        },{
            text: 'K-Means Clustering'
        },{
            text: 'Self Oragnizing Map'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Classification',
        columns: 2,
        items:[{
            rowspan: 3,
            text: 'More',
            iconCls: 'icon-ribbon-cl',
            arrowAlign:'bottom',
            scale: 'large',
            iconAlign: 'top',
            menu: [{
                text: 'Uncorrelated Shrunken Centroid Classification'
            }]
        },{
            text: 'Support Vector Machines'
        },{
            text: 'K-Nearest Neighbors'
        },{
            text: 'Discriminant Analysis'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Data Reduction',
        columns: 2,
        height: 90,
        items:[{
            text: '&nbsp;&nbsp;PCA&nbsp;',
            tooltip: 'Principal Component Analysis',
            iconCls: 'icon-ribbon-pca',
            arrowAlign:'bottom',
            iconAlign: 'top',
            scale: 'large',
            rowspan: 3
        },{
            text: 'Relevance Networks'
        },{
            text: 'Expression Terrain Map'
        },{
            text: 'Correspondence Analysis'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Meta Analysis',
        height: 90,
        columns: 1,
        items:[{
            text: 'GSEA',//'Gene&nbsp;Set&nbsp;Enrichment&nbsp;Analysis',
            tooltip: 'Gene&nbsp;Set&nbsp;Enrichment&nbsp;Analysis',
            iconCls: 'icon-ribbon-gsea',
            scale: 'small'
        },{
            text: 'GO for RNA-seq',
            tooltip: 'GO Analysis for RNA-seq',
            iconCls: 'icon-ribbon-goseq',
            scale: 'small'
        },{
            text: 'EASE Clusters',
            tooltip: 'EASE Cluster Analysis',
            iconCls: 'icon-ribbon-ease',
            scale: 'small'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Visualization',
        height: 90,
        columns: 1,
        items: [{
            text: 'Gene&nbsp;Distance&nbsp;Matrix',
            iconCls: 'icon-ribbon-gdm',
            style: 'margin-top: 3px',
            iconAlign: 'left'
        },{
            text: 'Linear&nbsp;Expression&nbsp;Map',
            iconAlign: 'left',
            style: 'margin-top: 3px',
            iconCls: 'icon-ribbon-lem'
        }]
    }, {
        xtype: 'buttongroup',
        title: 'Miscellaneous',
        height: 90,
        columns: 1,
        items: [{
            text: 'Gene Shaving',
            iconCls: 'icon-ribbon-gsh'
        },{
            text: 'Bayesian Networks',
            iconCls: 'icon-ribbon-bn'
        },{
            text: 'Literature Mining',
            iconCls: 'icon-ribbon-lm'
        }]
    }]
});


